-
Notifications
You must be signed in to change notification settings - Fork 9
Add support for /v4/user-from-token in FE - to be connected where needed later #452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
…ded later Signed-off-by: Lukasz Gryglicki <[email protected]>
WalkthroughA new user model class was introduced, along with a service method and a component method to fetch user data from a token-based endpoint. The flow retrieves user information using a token, updates component state, and handles errors, with relevant data also persisted to storage. Changes
Sequence Diagram(s)sequenceDiagram
participant Component as ProjectTitleComponent
participant Service as ClaContributorService
participant Backend as Backend API
participant Storage as StorageService
Component->>Service: getUserFromToken()
Service->>Backend: GET /v4/user-from-token
Backend-->>Service: UserFromTokenModel
Service-->>Component: Observable<UserFromTokenModel>
Component->>Component: Assign user property
Component->>Storage: Store userID and user object
alt Error occurs
Component->>Component: Emit error event
Component->>Service: handleError()
end
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
src/app/core/models/user.ts(1 hunks)src/app/core/services/cla-contributor.service.ts(1 hunks)src/app/shared/components/project-title/project-title.component.ts(2 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
src/app/core/services/cla-contributor.service.ts (1)
src/app/core/models/user.ts (1)
UserFromTokenModel(22-41)
🪛 GitHub Actions: Build
src/app/core/services/cla-contributor.service.ts
[error] 63-63: TypeScript error TS2304: Cannot find name 'UserFromTokenModel'.
Signed-off-by: Lukasz Gryglicki <[email protected]>
cc @mlehotskylf @thakurveerendras @amolsontakke3576 - this adds FE code to call
/v4/user-from-tokenAPI - to be used by FE when no user UUID is specified in path (as discussed earlier).Summary by CodeRabbit